<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="vue.js"></script>

</head>

<body>
  <div id="app">
    {{ num | currency }}
    {{ num | currency("$") }}
  </div>
  <script>
   /*  Vue.filter("currency",(v,p="￥")=>{
      console.log(p);
      return p+v;
    }) */
    new Vue({
      el: "#app",
      data:{
        num:5
      },
      filters:{
        currency(v,p="￥"){
          return p+v;
        }
      }
    })
  </script>
</body>

</html>